﻿using System;
using System.Collections.Generic;
using System.Windows.Controls;
using nRoute.Components;
using nRoute.Mapping;
using System.Windows.Media;
using System.Windows;

namespace nRoute.Samples.FutureDesktop.Views
{
    [MapNavigationContent("Pages/FuturePage/{Name}")]
    public partial class FuturePage 
        : UserControl
    {
        private readonly static List<string> RESOURCES_KEYS = new List<string>(new[] { "MediumContrastBkgBrush", "BkgContrastColorBrush",
            "BkgDarkColourBrush", "BkgDarkContrastColourBrush", "ForegroundLight2ColourBrush", "ForegroundLight3ColourBrush",
            "OnlineRadialBkgBrush", "OfflineRadialBkgBrush", "SideButtonHightlightBkgBrush" });

        public FuturePage()
        {
            InitializeComponent();

            this.SetRelayConverter<object, string>("DateTimeConverter", (o) => DateTime.Today.ToString("D"));
            this.SetRelayConverter<int, Brush>("UserColorConverter", (i) => (Brush)Application.Current.Resources[RESOURCES_KEYS[i]]);
        }
    }
}
